<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>10-兄弟节点</title>
</head>
<body>
    <ul>
        <li>富士山下</li>
        <li id="eason">好久不见</li>
        <li>K歌之王</li>
        <li>浮夸</li>
    </ul>

    <script>
        let esson = document.querySelector('#eason');

        // 获取兄弟节点
        console.log(eason.nextSibling);
        console.log(eason.previousSibling);

        // 获取兄弟元素节点
        console.log(eason.nextElementSibling);  //K歌之王
        console.log(eason.previousElementSibling); //富士山下
    </script>
</body>
</html>